<%
    /**
     * 记录明细区
     * edited by amon 2005-8-16
     */
%>
<form name="detailForm" action = "<%= ControllerURL%>">
<%
    logger.info("构造记录明细区");
    logger.debug("  -- 取记录明细区");
    ItemListArea ilArea = (ItemListArea)request.getAttribute("viewer");
    logger.debug("  -- 取翻页器");
    ValueListHandler valueListHandler  = (ValueListHandler)request.getAttribute("valueListHandler");
    logger.debug("  -- 翻页");
    List models = valueListHandler.getOnePage(currPageNum);
    logger.debug("  -- 显示记录明细");
    if(columns == null)
    {
        for(int i = 0; i < models.size(); i ++)
        {
            List items = ilArea.getItems(request.getContextPath(),(BaseObject)models.get(i));
            if(i%2 == 0)
            {
                %>
            <tr class='tr2' >
                <%
            }
            else
            {
                %>
            <tr class='tr3' >
                <%
            }
            for(int j = 0; j < items.size(); j ++)
            {
                Item item = (Item)items.get(j);
                %>
                <td >
                    <% 
                    if(item.getOnClickJSFunc() != null)
                    {
                    %>
                    <a href="#" onclick = "<%= item.getOnClickJSFunc()%>"><%= item.getText()%></a>
                    <%
                    }
                    else
                    {
                    %>
                    <%= item.getText()%>
                    <%
                    }
                    %>
                </td>
                <%
            }// for j
            %>
            </tr>    
            <%
        }// for i
    }
    else
    {
        for(int i = 0; i < models.size(); i ++)
        {
            List items = ilArea.getItems(request.getContextPath(),(BaseObject)models.get(i));
            if(i%2 == 0)
            {
                %><tr class='tr2' ><%
            }
            else
            {
                %><tr class='tr3' ><%
            }
            for(int j = 0; j < columns.length; j ++)
            {
                Item item = (Item)items.get(Integer.parseInt(columns[j]));
                %>
                <td >
                    <% 
                    if(item.getOnClickJSFunc() != null)
                    {
                    %><a href="#" onclick = "<%= item.getOnClickJSFunc()%>"><%= item.getText()%></a><%
                    }
                    else
                    {
                    %><%= item.getText()%><%
                    }
                    %>
                </td>
                <%
            }// for j
            %></tr><%
        }// for i
    }// if()
    logger.debug("  -- 翻页完毕");
%>
    <input type="hidden" name="serviceURL">
</form>
<%@ include file ="/common/List/_changePri_init.jsp"%>
